body > .ui-pnotify{
    z-index: 100050;
}
.ui-pnotify-modal-overlay, .modal-backdrop{
    background-color: rgba(0,0,0,.4);
}
%modal-window{
    background: #fff;
 	box-shadow: 9px 9px 3px rgba(0, 0, 0, 0.1), 0 0 3px #323232;
	border-radius: 0;
}
.ui-pnotify{
 	@extend %modal-window;
     width: 500px !important;
  	.alert{
   		font-family: $roboto_medium;
        margin: 0;
        border-top: none !important;
  		padding: 20px;
        &.alert-warning{
            border-top: 10px solid $blue;
            color: $blue;
        }
        &.alert-success{
            border-top: 10px solid $green;
            color: $green;
        }
        &.alert-info{
            border-top: 10px solid $blue;
            color: $blue;
        }
        &.alert-danger{
            border-top: 10px solid $red;
            color: $red;
        }
        .ui-pnotify-closer{
            visibility: visible !important;
        }
    	.ui-pnotify-title{
     		font: 18px/20px "RobotoRegular";
            color: $gray_text;
            margin-bottom: 20px;
    	}
        .ui-pnotify-icon{
            display: none;
        }
    	.ui-pnotify-text{
     		font: 14px/16px Arial, sans-serif;
     		color: $gray_text;

    	}
    	.ui-pnotify-action-bar{
			margin-top: 25px !important;
			text-align: left !important;
			.btn{
				border-color: transparent;
				color: $blue;
				padding: 0;
				margin-right: 20px;
				&:last-of-type{
					margin-right: 0;
				}
				&:hover, &:focus, &:active{
					background-color: transparent;
					text-decoration: underline;
				}
			}
		}
		.ui-pnotify-closer span{
    		@include cancel(16px);
    	}
  	}
    &.loading-indicator{
        border-radius: 0;
        .ui-pnotify-container{
            border-radius: 0;
            box-shadow: 9px 9px 3px rgba(0, 0, 0, 0.1);
        }
        .ui-pnotify-container.alert{
            padding: 30px 40px;
            border-top: none;
        }
        .ui-pnotify-title{
     		font: 24px/26px "RobotoLight";
            padding: 0;
            margin: 0;
    	}
    }
    &.centered-modal{
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -51%);
        -ms-transform: translate3d(-50%, -51%, 0);
        margin: 0;
    }
}
@media only screen and (max-width: 840px){
    #statusHistoryModal .modal-dialog,
    .statusHistoryModal .modal-dialog {
		width: calc(100% - 40px) !important;
        margin: 20px; 
	}
}
@media only screen and (max-width: 680px){
    .modal-dialog{
		width: calc(100% - 40px) !important;
        margin: 20px; 
	}
}
@media only screen and (min-width: $screen-sm-min){ 
  .modal:before {
    display: inline-block;
    vertical-align: middle;
    content: " ";
    height: 100%;
  }
}
.modal {
  text-align: center;
  padding-right: 0 !important;
  .table{
    td{
        .comment{
            padding-top: 10px;
            h4{
                margin-bottom: 5px;
            }
        }
    }
    td, th{
        padding: 10px;
        &:first-child{
            min-width: 160px;
        }
    }
    th{
		border-top: none !important;
	}
  }
    %hover{
		color: $gray-text;
		&:hover, &:focus, &:active{
			color: $blue;
			text-decoration: none;
		}
	}
	.template, .tetle-row{
		font-size: 16px;
		line-height: 18px;
	}
	.title-row{
		font-size: 16px;
		line-height: 18px;
		@extend %hover;
	}
	.interviewer{
		@extend %hover;
	}	
}
#statusHistoryModal .modal-dialog,
.statusHistoryModal .modal-dialog { 
    width: 800px; 
}
.modal-dialog {
  display: inline-block;
  text-align: left;
  vertical-align: middle;
  width: 660px;
}
.modal-content{
    border: none;
    box-shadow: 0 0 15px rgba(0,0,0,.5);
    h3{
        font-size: 14px;
        line-height: 16px;
    }
    font-size: 14px;
    line-height: 16px;
    p + h3{
        margin-top: 25px;
    }
    
	.modal-header{
        border: none;
        border-top-left-radius: 6px;
        border-top-right-radius: 6px;
        padding: 20px 20px 0;
		//margin-bottom: 25px;
    }
    .close{
        position: relative;
        @include opacity(0.5);
        span{
            @include cancel(20px);
        }
    }
	.modal-body{
		padding: 20px 20px 10px;
        .bootbox-body{
            h3{
                font: 18px/20px RobotoRegular;
            }
            p:last-child{
                margin: 0;
            }
        }
        ul li {
            margin-bottom: 5px;
            label{
                font: 14px/16px "RobotoRegular";
                font-weight: normal;
            }
            input {
                &:checked + label{
                    color: $gray_text;
                }
                & + label{
                    color: $gray_light;
                }
            }
        }
        .table-striped td{
            border-right: 1px solid $gray-form;
            &:last-child{
                border: none;
            }
        }
	}
    .modal-footer{
        border: none;
        text-align: left;
        padding: 20px;
        .btn-link{
            padding: 0;
            margin-right: 20px;
        }
    }
}
#confirmApprove{
    .modal-header{
        border-top: 6px solid #28a428;
        color: #28a428;
    }
}
#rejectConfirm{
    .modal-header{
        border-top: 6px solid #dd2c2c;
        color: #dd2c2c;
    }
}
.modal-dropdown{
    width: 315px;
    max-height: none;
    overflow-y: visible;
}
.context-menu{
 	@extend %modal-window;
    width: 280px;
    padding: 15px 10px;
    h3{
        font: 14px/16px "RobotoBold";
        margin-bottom: 20px;
        margin-left: 10px;
    }
    li{
        a{
            padding: 10px;
            &:hover, &:focus, &:active{
                background-color: #eff4f8;
            }
        }
        span{
            display: inline-block;
            padding: 10px;
            color: $gray_light;
        }
    }
}
.audio-question{
    .modal{
        .modal-dialog{
            max-width: 450px;
        }
        .modal-header{
            //margin-bottom: 10px;
            h5{
                padding: 0;
                line-height: 18px;
            }
            .modal-title {
                margin-bottom: 5px;
            }
        }
        .modal-body{
            canvas{
                display: block;
                margin: 0 auto;
            }
        }
        .modal-footer{
            
            .recordign-time{
                float: left;
                font: 24px/36px "RobotoLight";
            }
            button{
                float: right;
                padding: 10px;
                margin: 0 10px 0 0;
            }
        }
    }
}
@media (max-width: $screen-xs-min){
    .ui-pnotify{
        width: 300px !important;
        .input-group{
            width: 100%;
        }
    }
}

#overview{
    .modal-content{
        padding: 0;
    }
    .modal-dialog{
        max-width: 500px;
    }
    .modal-header{
        background-color: $gray-highlight-font;
        color: #fff;
        padding: 20px;
        //margin-bottom: 10px;
        h3{
            margin-bottom: 0;
            font-size: 18px;
            line-height: 20px;
        }
        .close{
            span{
                &:before, &:after{
                    background-color: $gray-highlighting;
                }
                &:hover, &:focus, &:active{
                    opacity: 1;
                    &::before, &::after{
                        background-color: #fff;
                        
                    }
                }
            }
        }
    }
    .modal-footer{
        padding: 20px;
    }
    
}
.overview-item{
    display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: stretch;
	align-content: stretch;
    padding-right: 35px;
    position: relative;
    .date{
        min-width: 65px;
        text-align: right;
        padding: 10px;
        font-style: italic;
        font-size: 12px;
        line-height: 14px;
        color: $gray_text;
        div:first-of-type{
            color: $gray_form;
        }
    }
    .item-content{
        word-wrap: break-word; 
        cursor: pointer;
        flex-grow: 1;
        padding: 10px;
        width: calc(100% - 65px);
        h4{
            margin-top: 0;
            margin-bottom: 5px;
            font-size: 16px;
            line-height: 18px;
        }
        p{
            font-family: "Robotobold";
            margin: 0;
        }
    }
    &.unanswered{
        .item-content{
            background-color: $gray-super-light;
            p{
                color: $blue;
                font-style: italic;
            }
        }
        .date div:last-of-type{
            color: $gray_form;
        }
        &.hasComment{

            .item-content{
                position: relative;
                *{
                    position: relative;
                    z-index: 10;
                }
                &:after{
                    display: block;
                    content: "";
                    position: absolute; 
                    width: 100%;
                    height: 100%;
                    top: 0;
                    left: 0;
                    background-color: rgba(245, 168, 226, 0.4);
                }
            }
        }
    }
    &.unanswered + .unanswered{
        .item-content{
            border-top: 1px solid $gray_form;
        }
    }
    &.invalid{
        color: $red_error;
        .item-content{
            background-color: $red-super-light;
        }
        .date div:last-of-type{
            color: $red_error;  
        }
        &.hasComment{

            .item-content{
                position: relative;
                *{
                    position: relative;
                    z-index: 10;
                }
                &:after{
                    display: block;
                    content: "";
                    position: absolute; 
                    width: 100%;
                    height: 100%;
                    top: 0;
                    left: 0;
                    background-color: rgba(245, 168, 226, 0.4);
                }
            }
        }
    }
    &.hasComment{
        background-color: rgba(245, 168, 226, 0.4);
        .date div:first-of-type{
            color: $gray_light;
        }
    }
    &.section{
        .item-content{
            cursor: default;
        }
        
        &:first-of-type{
            border-top: none;
            margin-top: 0;
        }
        display: block;
        border-top: 2px solid $gray_form;
        padding: 0 35px 0 65px;
        margin-top: 10px;
        h4{
            font: 20px/22px "RobotoBold";
        }
    }
    &.group{
        .item-content{
            cursor: default;
        }
        &:first-of-type{
            border-top: none;
            margin-top: 0;
        }
        display: block;
        border-top: 1px solid $gray_form;
        padding: 0 35px 0 65px;
        margin-top: 10px;
        h4{
            font: 20px/22px "RobotoRegular";
        }
        
    }
}
.custom-popover{
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 7px;
    position: absolute;
    top: 50%; 
    box-shadow: 0 0 10px;
    word-wrap: break-word;
    transform: translate(0,-50%);
    right: -345px;
    width: 315px;
    background-color: #fff;
    &.visible{
        visibility: visible;
        opacity: 1;
    }
    .popover-header{
        padding: 15px 20px 5px;
        color: $gray_text;
        h5{
            margin-top: 0;
        }
    }
    .popover-content{
        padding: 0 10px;
        h6{
            margin-top: 10px;
            span{
                color: $gray_form;
            }
        }
    }
    .popover-footer{
        padding: 0 10px;
    }

    .comments-block .comment{
        display: block;
        label{
            color: $gray_text;
        }
        margin-bottom: 15px;
        .input-group{
            display: block;
        }
        textarea.form-control{
            width: 100%;
            margin: 0 0 10px;
            resize: none;
            overflow: hidden;
            min-height: 40px;
        }
        .input-group-btn{
            padding-left: 0;
        }
    }
    &:after{
        content: " ";
        position: absolute;
        top: 50%;
        right: 100%; /* To the left of the tooltip */
        margin-top: -25px;
        border-width: 25px;
        border-style: solid;
        border-color: transparent #fff transparent transparent;
    }
}
.overloaded{
    position: relative;
    max-height: 56px;
    overflow: hidden;
    &:after{
        content: "";
        display: block;
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        box-shadow: 0px 0px 20px 15px #fff;
    }
    .btn-horizontal-hamburger{
        position: absolute;
        bottom: 0;
        left: -8px;
        z-index: 2;
    }
}
@media only screen and (max-width:  $screen-md){
    .custom-popover{
        box-shadow: 0 0 40px;
        top: auto;
        bottom: -15px;
        right: auto;
        left: 50%;
        transform: translate(-50%, 100%);
        z-index: 15;
        &:after{
            top: auto;
            bottom: 99%;
            right: auto;
            left: 50%;
            margin-top: 0;
            margin-left: -25px;
            border-color: transparent transparent #fff transparent;
        }
    }
}
#serverEditor{
    .modal-header{
        h2{
            margin: 5px 0;
        }
        h3{
            font: 20px/22px "RobotoLight";
        }
        .sub-header .label{
            font: inherit;
        }
        border-bottom: 1px solid rgb(221, 221, 221);
        
    }
    .modal-body{
        padding: 0;
        .alert{
            @extend .alert-warning;
            border-radius: 0;
            padding: 15px 20px;
            border-top: 1px solid #faebcc;
            border-bottom: 1px solid #faebcc;
        }
        .details{
            padding: 0 20px;
            margin: 10px 0;
            p{
                margin-bottom: 5px;
                &:last-of-type{
                    margin-bottom: 0;
                    label{
                        margin-bottom: 0;
                    }
                }
            }
            .form-group:last-of-type{
                margin-bottom: 5px;
            }
            &.administration-block{
                border-top: 1px solid #337ab7;
                border-bottom: 1px solid #337ab7;
                background-color: #c6def3;
                padding: 15px 20px;
                .radio{
                    label{
                        padding: 8px;
                    }
                    input{
                        margin-top: 0;
                    }
                    & + .radio{
                        margin-top: 0;
                    }
                } 
            }
        }
        
    }
}